<#import "/macro.ftl" as m>
<@m.page_header title='后台' />
<div id="page-content-wrapper">

<div id="page-title">

    <h3>
        支付网关统计
        <small>
            
        </small>
    </h3>
</div>

<div class="example-box">
    <div class="example-code">

        <a href="/stat/statpaygate/0" class="btn large hover-yellow" title="">
            <span class="button-content">今日统计</span>
        </a>
        &nbsp;&nbsp;
        <a href="/stat/statpaygate/1" class="btn large hover-yellow" title="">
            <span class="button-content">昨日统计</span>
        </a>
        &nbsp;&nbsp;
        <a href="/stat/statpaygate/7" class="btn large hover-yellow" title="">
            <span class="button-content">7日统计</span>
        </a>
        &nbsp;&nbsp;
        <a href="/stat/statpaygate/30" class="btn large hover-yellow" title="">
            <span class="button-content">30日统计</span>
        </a>
        &nbsp;&nbsp;
        <a href="/stat/statpaygate/100" class="btn large hover-yellow" title="">
            <span class="button-content">全部统计</span>
        </a>

    </div>	
</div>
   
   
   		<form id="form" action="/stat/statpaygate/10" method="get">
    		<div class="form-row">
    			<div class="form-input col-md-2">
    				<#if startTime>
            		<input type="text"   name="startTime" data-trigger="focus" data-required="true" class="parsley-validated" value="${startTime}" onClick="WdatePicker({isShowWeek:true,dateFmt:'yyyy-MM-dd'})" style="clear:both;overflow:hidden;display:block">
          			<#else>
    				<input placeholder="时间" type="text"   name="startTime" data-trigger="focus" data-required="true" class="parsley-validated" value="" onClick="WdatePicker({isShowWeek:true,dateFmt:'yyyy-MM-dd'})" style="clear:both;overflow:hidden;display:block">
    				</#if>
    			</div>
    			<div class="form-input col-md-2">
		        	<a href="javascript:;" class="btn large primary-bg radius-all-4" id="search" title="Validate!" onclick="$('#form').trigger('submit');">
			            <span class="button-content">
			                查询
			            </span>
	                </a>
		        </div>
		        	<div>
				        <a href="/stat/paygateexport/${startTime}&${endTime}" class="btn large primary-bg" title="">
				            <span class="button-content">导出Excel</span>
				        </a>
	   				</div>
    		</div>
    	</form>
   
<div class="pad10A">

<table class="table" id="exp">
	    <thead>
	    <tr>
	    	<th>支付网关（<#if msg=='a'>7日统计<#elseif msg=='b'>30日统计<#elseif msg=='c'>总统计<#elseif msg=='d'>昨日统计<#else>今日统计</#if>）</th>
	        <th>银行</th>
	        <th>交易总金额</th>
	        <th>最大交易金额</th>
	        <th>交易笔数</th>
	        <th>交易成功笔数</th>
	        <th>成功率</th>
	    </tr>
	    </thead>
	    <tbody>
	    <#list result?keys as resultKey>
	    	<#list bankCardList as source>
	    	<#if source.bankCode=="All">
	    	<tr>
		    	<td style="color:red;">${resultKey}</td>
		        <td class="center" style="color:red;">${source.bankName}</td>
		        <td class="center" style="color:red;">${result[resultKey][source.bankName]["AA"]}</td>
		        <td class="center" style="color:red;">${result[resultKey][source.bankName]["HA"]}</td>
		        <td class="center" style="color:red;">${result[resultKey][source.bankName]["DLT"]}</td>
		        <td class="center" style="color:red;">${result[resultKey][source.bankName]["SDLT"]}</td>
		        <td class="center" style="color:red;">${result[resultKey][source.bankName]["successrate"]}</td>
		    </tr>
		    <#else>
		    <#if result[resultKey][source.bankName]["DLT"]!=0>
		    <tr>
		    	<td>${resultKey}</td>
		        <td class="center">${source.bankName}</td>
		        <td class="center">${result[resultKey][source.bankName]["AA"]}</td>
		        <td class="center">${result[resultKey][source.bankName]["HA"]}</td>
		        <td class="center">${result[resultKey][source.bankName]["DLT"]}</td>
		        <td class="center">${result[resultKey][source.bankName]["SDLT"]}</td>
		        <td class="center">${result[resultKey][source.bankName]["successrate"]}</td>
		    </tr>
		    </#if>
		    </#if>
	        </#list>
	    </#list>
	    </tbody>
	    <tfoot>
	    <tr>
	    	<th>支付网关（<#if msg=='a'>7日统计<#elseif msg=='b'>30日统计<#elseif msg=='c'>总统计<#elseif msg=='d'>昨日统计<#else>今日统计</#if>）</th>
	        <th>银行</th>
	        <th>交易总金额</th>
	        <th>最大交易金额</th>
	        <th>交易笔数</th>
	        <th>交易成功笔数</th>
	        <th>成功率</th>
	    </tr>
	    </tfoot>
	    </table>
</div>
</div>

<script>
</script>
